home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Jumpstart / Multimedia Microsoft Jumpstart Version 1.1a (Microsoft).BIN / develpmt / source / sprites / ppdbg.asm < prev    next >
Encoding:
Assembly Source File  |  1993-03-08  |  2.1 KB  |  121 lines

  1.     page 60,132
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;
  4. ;   ppdbg.asm
  5. ;
  6. ;   Printer port debug stuff
  7. ;
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
  9.  
  10.         .286
  11.  
  12.         .xlist
  13.         include cmacros.inc                   
  14.         .list
  15.  
  16. ?PLM=1  ; pascal call convention
  17. ?WIN=1  ; Windows prolog/epilog code
  18.  
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. ;
  21. ;   equates
  22. ;
  23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  24.  
  25. LPT1    equ 3BCH
  26. LPT2    equ 378H
  27. LPT3    equ 278H
  28.  
  29. PORT    equ LPT2
  30.  
  31. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  32. ;
  33. ;   data segment
  34. ;
  35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  36.  
  37. sBegin DATA
  38.  
  39. sEnd DATA
  40.  
  41. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  42. ;
  43. ;   code segment
  44. ;
  45. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  46.  
  47. sBegin CODE
  48.  
  49.         assumes cs, CODE
  50.         assumes ds, DATA
  51.  
  52.  
  53.  
  54.  
  55. cProc ppdbgSet <FAR, PASCAL, PUBLIC> <si, di>
  56.  
  57.         ParmB maskbits
  58.  
  59.         cBegin
  60.  
  61.         mov dx, PORT
  62.         mov ah, maskbits
  63.  
  64. ;       pushf
  65. ;       cli             ; we want this atomic
  66.  
  67.         in al, dx
  68.         or al, ah
  69.         out dx, al
  70.  
  71. ;       popf
  72.  
  73.         cEnd
  74.  
  75. cProc ppdbgClear <FAR, PASCAL, PUBLIC> <si, di>
  76.  
  77.         ParmB maskbits
  78.  
  79.         cBegin
  80.  
  81.         mov dx, PORT
  82.         mov ah, maskbits
  83.         not ah
  84.  
  85. ;       pushf
  86. ;       cli             ; we want this atomic
  87.  
  88.         in al, dx
  89.         and al, ah
  90.         out dx, al
  91.  
  92. ;       popf
  93.  
  94.         cEnd
  95.  
  96. cProc ppdbgPulse <FAR, PASCAL, PUBLIC> <si, di>
  97.  
  98.         ParmB maskbits
  99.  
  100.         cBegin
  101.  
  102.         mov dx, PORT
  103.         mov ah, maskbits
  104.  
  105. ;       pushf
  106. ;       cli             ; we want this atomic
  107.  
  108.         in al, dx
  109.         xor al, ah
  110.         out dx, al
  111.         xor al, ah
  112.         out dx, al
  113.  
  114. ;       popf
  115.  
  116.         cEnd
  117.  
  118. sEnd CODE
  119.  
  120.         end
  121.